<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFinancesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('finances', function (Blueprint $table) {
            $table->engine='InnoDB';
            $table->increments('id');
            $table->integer('credit_rating')->default(0)->comment('信用等级');
            $table->float('registered_capital',2)->comment('注册资金');
            $table->string('bank',10)->comment('户银行');
            $table->string('bank_account',10)->comment('银行账户');
            $table->integer('company_tax_number')->comment('公司税号');
            $table->string('invoice_type',10)->comment('发票类型');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('finances');
    }
}
